package com.wangjw.rest.impl;

import com.wangjw.pojo.Product;
import com.wangjw.rest.ProductService;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by wangjw on 18/6/28.
 */
@Component
public class ProductServiceImpl implements ProductService {

    @Override
    public List<Product> retrieveAllProducts() {
        List<Product> productList = new ArrayList<>();
        productList.add(new Product(1, "Java"));
        productList.add(new Product(2, "C++"));
        productList.add(new Product(3, "Js"));
        return productList;
    }

    @Override
    public Product retrieveProductById(long id) {
        return null;
    }

    @Override
    public List<Product> retrieveProductsByName(String name) {
        return null;
    }

    @Override
    public Product createProduct(Product product) {
        return null;
    }

    @Override
    public Product updateProductById(long id, Map<String, Object> fieldMap) {
        return null;
    }

    @Override
    public Product deleteProductById(long id) {
        return null;
    }
}
